var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var BundleConfig = require("AA_BundleConfig");
var LogManager = require("AA_LogManager");
var ResKeeper = require("AA_ResKeeper");
var Excel = require("AA_Excel");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;

var _def_UI_SkillItem = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.iconimg = null;
    t.iconbg = null;
    t.countLb = null;
    t.nowback = null;
    t.nowdata = null;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype.initView = function (e, t) {
    return __awaiter(this, undefined, undefined, function () {
      var o;
      var n;
      var i;
      return __generator(this, function (a) {
        switch (a.label) {
          case 0:
            this.nowback = t;
            this.nowdata = e;
            LogManager.LogMgr.info("shujuid", this.nowdata);
            o = Excel.Excel.shuiguocitiao(e.id);
            return [4, this._loadRes(BundleConfig.BundleNames.Game, "game/" + "res/skill_icon" + o.quality, cc.SpriteFrame)];
          case 1:
            n = a.sent();
            this.iconbg.spriteFrame = n;
            return [4, this._loadRes(BundleConfig.BundleNames.Common, "common/" + "res/skillicon/skill_" + e.id, cc.SpriteFrame)];
          case 2:
            i = a.sent();
            this.iconimg.spriteFrame = i;
            this.countLb.string = "×" + e.count;
            return [2];
        }
      });
    });
  };
  _creator.prototype.onClick = function () {
    this.nowback(this);
  };
  __decorate([_property(cc.Sprite)], _creator.prototype, "iconimg", undefined);
  __decorate([_property(cc.Sprite)], _creator.prototype, "iconbg", undefined);
  __decorate([_property(cc.Label)], _creator.prototype, "countLb", undefined);
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_UI_SkillItem;